package com.realbrand.net.realbrandpay.base;

/**
 * Created by Administrator on 2018/5/8.
 */

public class BasePersenter<V extends BaseView> {
    private V view;

    /**
     * 绑定View
     *
     * @param view
     */
    public void attachView(V view) {
        this.view = view;
    }

    /**
     * 断开View,一般在OnDestroy中调用
     *
     *
     */
    public void detachView() {
        this.view = null;
    }

    public boolean isViewAttched() {
        return view != null;
    }

    /**
     * 获取连接的view
     */
    public V getView() {
        return view;
    }

}
